<script setup>
import GoBack from "../../components/GoBack.vue";
import store from "../../store";
store.getPolicy();
</script>

<script>
export default {
  data() {
    return {
      time: "",
    };
  },
  methods: {
    timestampToTime(timestamp) {
        const date = new Date(timestamp * 1000);
        Y = date.getFullYear() + '-';
        M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
        D = date.getDate() + ' ';
        h = date.getHours() + ':';
        m = date.getMinutes() + ':';
        s = date.getSeconds();
        return Y+M+D+h+m+s;
    }
  }
}
</script>

<template>
  <!-- <div><GoBack></GoBack></div>
  <div class="border">
    <h1>标题{{ store.state.policy.theme }}</h1>
    <div class="date">
      时间：{{ timestampToTime(store.state.policy.timeStamp) }}
      <span class="font">来源：{{ store.state.policy.source }}</span>
      <span class="font">类别：{{ store.state.policy.policyType }}</span>
    </div>
    <div class="content">{{ store.state.policy.bulk }}</div>
  </div> -->
  <h1>222</h1>
</template>

<style scoped>
* {
  list-style: none;
  padding: 0;
  margin: 0;
}
body {
  color: #333;
  font-family: "宋体";
}
div {
  display: block;
  padding: 10px 30px;
}
.back {
  height: 40px;
  width: 40px;
  display: block;
  background-image: url(../public/back.png);
  background-size: cover;
  background-repeat: no-repeat;
}
.date {
  position: relative;
  border-bottom: 1px #dcdcdc solid;
  padding-top: 7px;
  padding: 0;
  text-align: left;
  color: #666666;
  font-size: 14px;
  height: 35px;
  overflow: hidden;
}
span.font {
  margin: 0 10px;
}
.content {
  line-height: 30px;
  margin: 0;
  padding: 40px 0 40px 0;
  font-size: 16px;
}
</style>
